package com.cskaoyan.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

@Data
@NoArgsConstructor
public class Order {
    private Integer id = null;

    private Integer userId = 0;

    private String orderSn = "";

    private Integer orderStatus = 0;

    private String consignee = "";

    private String mobile = "";

    private String address = "";

    private String message = "";

    private BigDecimal goodsPrice = new BigDecimal(0);

    private BigDecimal freightPrice = new BigDecimal(0);

    private BigDecimal couponPrice = new BigDecimal(0);

    private BigDecimal integralPrice = new BigDecimal(0);

    private BigDecimal grouponPrice = new BigDecimal(0);

    private BigDecimal orderPrice = new BigDecimal(0);

    private BigDecimal actualPrice = new BigDecimal(0);

    private String payId = "";

    private Date payTime;

    private String shipSn = "";

    private String shipChannel = "";

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Timestamp shipTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Timestamp confirmTime;

    private Short comments = 0;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Timestamp endTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Timestamp addTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;

    private Boolean deleted = false;

}